Debuggability is a feature that is very useful and also necessary to have inside of WebWork. But what about seeing the values of your properties or testing your OGNL-expressions against the value stack? If you like to do that, use the Debugging Interceptor. Installing DebuggabilityDownload the Attachment "Debuggability for WebWork 2.2.2-all files.zip" before following the installing instructions. 1. Add the folder hierarchy "/interceptors/debugging" to your application. 2. Compile the files "DebuggingInterceptor.java" and "PrettyPrintWriter.java", after you have customised the package-path 3. Add the "console.ftl" (Freemarker-template) to a folder called "templates/freemarker" to the root of your webapplication. 4. Tell the console.ftl the baseUrl to search for its files by defining var baseUrl = "/yourApplication-Root/templates"; 5. Save the following files in /yourApplication-Root/templates: - webconsole.css - the stylesheet for the console 6. Your pom.xml should make freemarker available: <dependency> <groupId>freemarker</groupId> <artifactId>freemarker</artifactId> <version>2.3.4</version> </dependency> 7. Your webwork.properties needs to allow debugging by adding the following line: webwork.devMode=true
8. To use the interceptor, add it to your xwork.xml with a reference: <interceptor-ref name="debugging" />
9. Declare the interceptor to your application by <interceptors> <interceptor name="debugging" class="com.agimatec.ostium.portlets.observator.interceptors.debugging.DebuggingInterceptor"/> </interceptors>
(e.g. inside the package-Tag). If you have any problems or further questions, contact me, Tamara Cattivelli, at [email protected]. Using DebuggerYou have several possibilities to use the Debugger, you "installed" right now. If you like to debug your application/action, just call your action (if you like through the config-browser) and add the debug-parameter to your action query string, by appending "?" and then the value.
example: http://localhost:8080/mypath/tomy/applicationsaction/myAction.action?debug=console
|